<?php


namespace app\index\controller;


use think\admin\Controller;

class Push extends Controller
{

    function push()
    {
        if (function_exists("shell_exec")) {
            $local = '/home/wwwroot/pt.jampay.cn/';
            $remote = 'https://gitee.com/wojiaowuqi/group-work.git';
            $cute = "cd {$local} && git pull 2>&1";
            echo shell_exec($cute);
            die("下拉完成-" . date('Y-m-d H:i:s'));
        } else {
            die('系统配置：shell_exec函数不可用');
        }
    }
}